
from decimal import getcontext
# round 默认采用 “奇进偶出” HALF_EVEN

print(f'round:{round(3.5)}')  # 4
print(f'round:{round(4.5)}')  # 4
print(f'round:{round(3.6)}')  # 4
print(f'round:{round(3.3)}')  # 3
print(getcontext().rounding)  # ROUND_HALF_EVEN
